﻿//======================================================================
//  邮件类实体类,配合Sender类使用
//====================================================================== 

using System;
using System.Collections.Generic;
using System.Text;

namespace Common
{
    /// <summary>
    /// 邮件类实体类,配合Sender类使用
    /// </summary>
    public sealed class Email
    {
        private string smtpServer;
        private short port = 25;
        private string login;
        private string password;
        private string from;
        private string to;
        private string subject;
        private string body;
        private Encoding charset = Encoding.UTF8;

        /// <summary>
        /// SMTP服务器地址
        /// </summary>
        public string SMTPServer
        {
            get { return this.smtpServer; }
            set { this.smtpServer = value; }
        }

        /// <summary>
        /// 端口号
        /// </summary>
        public short Port
        {
            get { return this.port; }
            set { this.port = value; }
        }
        /// <summary>
        /// SMTP登录名
        /// </summary>
        public string Login
        {
            get { return this.login; }
            set { this.login = value; }
        }
        /// <summary>
        /// SMTP登陆密码
        /// </summary>
        public string Password
        {
            get { return this.password; }
            set { this.password = value; }
        }

        /// <summary>
        /// 发件人
        /// </summary>
        public string From
        {
            get { return this.from; }
            set { this.from = value; }
        }
        /// <summary>
        /// 收件人
        /// </summary>
        public string To
        {
            get { return this.to; }
            set { this.to = value; }
        }
        /// <summary>
        /// 主题
        /// </summary>
        public string Subject
        {
            get { return this.subject; }
            set { this.subject = value; }
        }
        /// <summary>
        /// 内容
        /// </summary>
        public string Body
        {
            get { return this.body; }
            set { this.body = value; }
        }

        /// <summary>
        /// 邮件编码
        /// </summary>
        public Encoding CharSet
        {
            get { return this.charset; }
            set { this.charset = value; }
        }
    }
}
